<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>登录</title>
		 <link href="../css/bootstrap.min.css" rel="stylesheet" />
 		 <link rel="stylesheet" type="text/css" href="../fonts/iconfont.css">
 		 <link rel="stylesheet" type="text/css" href="../css/style.css"/>
		<style>
			   *{font-family: "微软雅黑";}
			   body,html{width: 100%;height: 100%;}
			   .navbar{border: none;background-color: #fff;}
			   .nav > li > a{padding-right: 0}
			   .nav_lt_font a{margin-top: 20px;padding-right: 0;font-size: 16px;}
			   .nav_font li{text-align: center;}
			   .navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus{background: none;font-weight: bolder}
			  .bg_denglu{width: 100%;height: 100%;background-color: rgba(0,0,0,0.6);overflow: hidden;position: fixed;}
			   .bgImage img{position: absolute;left:0;right: 0;top: 0;bottom: 0;width: 100%;height: 100% }
			  .denglu_user{margin-top: 5%;}
			  .denglu_user h3{border-bottom: 1px solid #eee;margin-bottom: 50px;}
			  .denglu_user h3>span{display: inline-block;padding: 10px 0;border-bottom: 4px solid #6bc50d;font-size: 18px;color: #252525;}
			  .denglu_user .form-group{padding: 15px 0;}
			  
			  .btn-success{background-color: #6bc50d;}
			  .btn-success:hover{background-color: #6bc50d;}
			  .btn-success.focus, .btn-success:focus{background-color: #6bc50d;}
		</style>
	</head>
	<body>
	<nav class="navbar navbar-default" style="margin: 0;">
	  <div class="container" >
		  <div class="navbar-header">
			  <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
				  <span class="sr-only">Toggle navigation</span>
				  <span class="icon-bar"></span>
				  <span class="icon-bar"></span>
				  <span class="icon-bar"></span>
			  </button>
			  <a class="navbar-brand" href="#">
				  <img alt="Brand" src="../img/logo.png" >
			  </a>
		  </div>
	
	    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
	      <ul class="nav navbar-nav nav_lt_font">
			  <li ><a href="../index.html">首页 <span class="sr-only">(current)</span></a></li>
			  <li><a href="cyzfw_index.html">创业者服务</a></li>
			  <li><a href="touziren_index.html">投资者服务</a></li>
			  <li><a href="javascript:void(0);" class="tutorService">导师服务</a></li>
			  <li><a href="xqfb_index.html">技术需求者</a></li>
			  <li><a href="yixingdasai.html">熠星大赛</a></li>
		      </ul>
	      <ul class="nav navbar-nav navbar-right nav_font">
	      <!--<li><a href="#"><i class="iconfont icon-sousuo_sousuo"></i><br>搜索</a></li>-->
	      <li><a href="denglu.html"><i class="iconfont icon-zhuce"></i><br>登陆</a></li>
      	  <li><a href="zhuche.html"><i class="iconfont icon-denglu"></i><br>注册</a></li> 
	        </li>
	      </ul>
	    </div>
	  </div>
	</nav>

	<div class="bg_denglu">
		<div class="bgImage">
			<img src="../img/loginBg.png">
		</div>

		<div class="row denglu_user">
			<div class="col-xs-8 col-xs-offset-2" style="background-color: #fff;padding-bottom: 50px;">
				<h3><span>用户登录</span></h3>
				<div class="row">
					<div class="col-xs-offset-4 col-xs-4">
						<form class="form-horizontal" action="http://114.112.96.184:18080/sys/login">
						<div class="form-group" >
						    <label class="sr-only" for="phoneNumbar">Email address</label>
						    <input type="tel" class="form-control" id="phoneNumbar" name="username" datatype="*"  sucmsg="用户名验证通过！" nullmsg="请输入用户名！" errormsg="请输入手机号码登录！" placeholder="手机号码">
						  </div>
						  <div class="form-group">
						    <label class="sr-only" for="password">Password</label>
						    <input type="password" class="form-control" datatype="*5-15" name="password" errormsg="密码范围在6~15位之间！"  id="password" placeholder="密码">
						  </div>
							<div class="form-group">
								<button type="submit" class="btn btn-success center-block" style="width: 100%;">登录</button>
							</div>
						  
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	</body>
<script src="../js/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src='../js/bootstrap.min.js'></script>
<script type="text/javascript" src="../js/Validform_v5.3.2_min.js" ></script>
<script type="text/javascript" src="../js/newsDetails.js"></script>
<script type="text/javascript">
	$(".form-horizontal").Validform({
		ajaxPost:true,
		
		callback:function(object){
			console.log(object)
			if(object.code=="000"){
                if (object.result.admin==true) {
                    var userId ={"userid":object.result.id}
                    sessionStorage.setItem("userId",JSON.stringify(userId));
                    window.location.href='houtai/hutai.html';
                }
                if (object.code=='000'&&object.result.admin==false) {
                    var person = {"userid":object.result.id,"admin":object.result.admin,"invest":object.result.invest,"tutor":object.result.tutor,"startup":object.result.startup,"technical":object.result.technical,"username":object.result.username};
                    if(window.sessionStorage){
                        sessionStorage.setItem("person",JSON.stringify(person));
                        window.location.href='../index.html';
                    }else{
                        alert("浏览暂不支持本网页，请升级浏览器或更换其他浏览器！")
                    }

                }
            }else {
                $('div.Validform_info').text(object.msg)
			}

		
		}
	});
	$('.bgImage img').on('click',function () {
		window.location.href='../index.html';
	})

</script>
</html>
